<template>
  <div class="user-info">
    <div class="info">
      <div class="user-img">
        <a-avatar :size="64" icon="user" />
        <!-- <img src="../../assets/img/logo.png" alt /> -->
      </div>
      <div>
        <div class="text1" >您好,{{userInfo.realName}},祝您开心每一天。</div>
        <!-- <div class="text2">欢迎使用广联后台管理系统。</div> -->
      </div>
    </div>
  </div>
</template>
<script>

import { mapState } from "vuex";
export default {
  props: {
    hreadcrumbAry:Array,
  },
  data() {
    return {
      collapsed: false,
      useId: undefined,
      pagination: {
        //分页参数
        current: 1, //当前页
        total: 0, //总条数
        pageSize: 10, //每页多少条
        showQuickJumper: true, //显示跳转到第N页的输入框
      },
    };
  },
  computed: {
    ...mapState({
      userInfo: (state) => state.user.userInfo,
    }),
  },
  components: {
  },
  created() {
    // this.getUserList();
  },
  mounted(){
    console.log('header mounted')
    console.log(this.userInfo)
  },
  methods: {
    changeItem(item){
      console.log(item)
    },
    async getUserList(){
      let { data } = await getUserList({
        pageNum: this.pagination.current,
        pageSize: this.pagination.pageSize,
        useId:this.useId
      })
      console.log(data)
      if(data.code === 200){
        this.realName = data.resule.realName
      }
    }
  },
};
</script>
<style lang="less" scoped>
@import "~@/assets/css/base.less";
.info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  .user-img {
    width: 64px;
    height: 64px;
    margin-right: 15px;
    img {
      width: 64px;
      height: 64px;
    }
  }
  .text1 {
    font-size: 15px;
  }
  .text2 {
    font-size: 13px;
    color: #939ea8;
    margin-top: 8px;
  }
}
</style>